home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2002 #11
/
Amiga Plus CD - 2002 - No. 11.iso
/
Tools
/
Freeware
/
DiskMaster
/
Rexx
/
TTM-DM2LoadIcon.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
2002-10-27
|
2KB
|
58 lines
/* $VER: TTM-DM2LoadIcon.rexx 1.3 (2.10.98) by J. Tierney
TTManager DiskMaster II Load Icon v1.3
10/2/98 J. Tierney <jtierney@cyberlink-inc.com>
Purpose: Opens a new TTManager window for all selected files.
Requires: DiskMaster II,
TTManager - version 3.3d2 or above.
DM2 Usage: REXX TTM-DM2LoadIcon.rexx
*/
ttm = 'TTManager NOWARNINGS' /* Change this line to the path & options you use
for TTM, in case it isn't already running. */
OPTIONS RESULTS
who = ADDRESS() /* Who ran this script? DM.1, DM.2, DM.27? */
/* Start TTM if it isn't running. */
IF ~SHOW('P', 'TTMANAGER') THEN DO
ADDRESS COMMAND 'Run >NIL:' ttm
ADDRESS COMMAND 'SYS:RexxC/WaitForPort TTMANAGER'
IF rc ~= 0 THEN DO
MSG 'Unable to find TTManager''s port.'
EXIT 10
END
END
/* Get the source window's dir. */
STATUS P
dir = result
IF RIGHT(dir, 1) ~= ':' THEN dir = dir || '/'
/* Get selected files. */
files = ''
DIRLIST VAR dlist SEL
DO i = 1 TO dlist.name.0
fname = '"' || dir || dlist.name.i || '"'
files = files fname
END
IF files ~= '' THEN DO
ADDRESS 'TTMANAGER' /* Hello, TTManager. */
'GETSCREEN'
scr = result /* Store the screen TTM normally uses. */
'SETSCREEN' who /* Tell TTM to open it's window's on DM's screen. */
NEWWINDOW files /* Tell TTM to open these files. */
'SETSCREEN' scr /* Switch back to using the old screen. */
ADDRESS VALUE who /* Let's talk to whichever DM called us. */
DESELECT '*' /* Unselect the selected files. */
SCREENTOFRONT /* Hmmm, what could this do? */
END